package com.anlogic.sdk.tools.nativetool;

public class NativeBspTool {
	static {
		System.loadLibrary("miniz");
		System.loadLibrary("pugixml");
		System.loadLibrary("bsp_tool");
		System.loadLibrary("native_bsp_tool");
	}
	
	private String chip;
	
	public String getChip() {
		return this.chip;
	}
	
	public void setChip(String chip) {
		this.chip = chip;
	}

	public native void redirectStdoutInit();
	
	public native String redirectStdoutDone();
	
	public native void createDefaultMss(String mssPath, String chip, String proc, String os);

	public native void createMssFromHpf(String hpf, String mssPath, String chip, String proc, String os);

	public native String getProcessor(String mssPath);

	public native String getOsInfo(String mssPath);

	public native String getDocInfo(String mssPath);
	
	public native String getDriverList(String mssPath);

	public native String getDriver(String mssPath, String name);

	public native void removeDriver(String mssPath, String name);

	public native void addDriver(String mssPath, String name, String version);

	public native void setDriverVersion(String mssPath, String name, String version);

	public native String getLibraryList(String mssPath);

	public native String getLibrary(String mssPath, String name);
	
	public native void removeLibrary(String mssPath, String name);

	public native void addLibrary(String mssPath, String name, String version);

	public native void setLibraryVersion(String mssPath, String name, String version);
	
	public native void generteBsp(String hpfPath, String mssPath, String bspLocation);

	public native void regenerateBsp(String mssPath, String bspLocation);
	
	public native String getAppNames(String os, String chip, String proc);

	public native String getStandaloneAppNames();

	public native String getFreeRtosAppNames();

	public native String getRtthreadAppNames();

	public native String getLinuxAppNames(String chip, String proc);
	
	public native String getAppDesc(String appName);

	public native String getAppLibs(String appName);
	
	public native String getAppExtraLibs(String mssfile, String appName);

	public native String getAppBuildProperties(String appName);

	public native void generateApp(String bspPath, String appName, String appLocation);
	
	public native void updateAppLinkscript(String bspLocation, String appLocation);
	
	public native String getDriverAppNames(String driverName, String os, String chip, String proc);

	public native String getChipFromHpf(String hpf);

	public native String getIncludePaths(String bspLocation);
	
	public native String getLinkScripts(String appLocation, String chip, String download);

	public native void updateBspHpf(String bspLocation, String hpf);
	
	public native String getOsNames();
	
	public native String getDriverNames();

	public native String getLibraryNames();
	
	public native String getOsVersions(String name);
	
	public native String getDriverVersions(String name);

	public native String getLibraryVersions(String name);

	public native String getOsFromCfgFile(String name, String version);

	public native String getDriverFromCfgFile(String name, String version);
	
	public native String getLibraryFromCfgFile(String name, String version);
	
	public native void processAppMakefile(String bspLocation, String appLocation, String appName);
}
